﻿using Microsoft.VisualStudio.TestTools.UnitTesting;
using GameObjects;
namespace Tests
{
    
    
    /// <summary>
    ///This is a test class for GameStateTest and is intended
    ///to contain all GameStateTest Unit Tests
    ///</summary>
    [TestClass()]
    public class GameStateTest
    {


        private TestContext testContextInstance;

        /// <summary>
        ///Gets or sets the test context which provides
        ///information about and functionality for the current test run.
        ///</summary>
        public TestContext TestContext
        {
            get
            {
                return testContextInstance;
            }
            set
            {
                testContextInstance = value;
            }
        }

        #region Additional test attributes
        // 
        //You can use the following additional attributes as you write your tests:
        //
        //Use ClassInitialize to run code before running the first test in the class
        //[ClassInitialize()]
        //public static void MyClassInitialize(TestContext testContext)
        //{
        //}
        //
        //Use ClassCleanup to run code after all tests in a class have run
        //[ClassCleanup()]
        //public static void MyClassCleanup()
        //{
        //}
        //
        //Use TestInitialize to run code before running each test
        //[TestInitialize()]
        //public void MyTestInitialize()
        //{
        //}
        //
        //Use TestCleanup to run code after each test has run
        //[TestCleanup()]
        //public void MyTestCleanup()
        //{
        //}
        //
        #endregion


        ///// <summary>
        /////A test for CreateVectorsFiles
        /////</summary>
        //[TestMethod()]
        //public void CreateVectorsFilesTest()
        //{
        //    string mapName = string.Empty; // TODO: Initialize to an appropriate value
        //    GameState target = new GameState(mapName); // TODO: Initialize to an appropriate value
        //    string[] expected = null; // TODO: Initialize to an appropriate value
        //    string[] actual;
        //    actual = target.CreateVectorsFiles();
        //    Assert.AreEqual(expected, actual);
        //    Assert.Inconclusive("Verify the correctness of this test method.");
        //}

        /// <summary>
        ///A test for CreateTerrainTypesFile
        ///</summary>
        [TestMethod()]
        public void CreateTerrainTypesFileTest()
        {
            GameState gameState = new GameState();

            var expected = "S, Sea, Water, None, 4, 0, 0.5, 1, 0\r\n" +
                            "R, Reef, Water, All, 2, 0.5, 0.7, 1, 0\r\n" +
                            "L, Lake, Water, None, 4, 0, 0, 1, 0\r\n" +
                            "G, Grassland, Land, None, 4, 0.75, 0.85, 0.5, 0.06";

            gameState.BuildTerrainTypes(expected);

            //var actual = gameState.CreateTerrainTypesFile();
            //Assert.AreEqual(expected, actual);
            //Assert.Inconclusive("Verify the correctness of this test method.");
        }

        ///// <summary>
        /////A test for CreateHexesFiles
        /////</summary>
        //[TestMethod()]
        //public void CreateHexesFilesTest()
        //{
        //    GameState gameState = new GameState();

        //    var terrainTypes = "S, Sea, Water, None, 4, 0, 0.5, 1, 0\r\n" +
        //                    "R, Reef, Water, All, 2, 0.5, 0.7, 1, 0\r\n" +
        //                    "L, Lake, Water, None, 4, 0, 0, 1, 0\r\n" +
        //                    "G, Grassland, Land, None, 4, 0.75, 0.85, 0.5, 0.06";

        //    gameState.BuildTerrainTypes(terrainTypes);

        //    var expected = "GSRG\r\nSGRL";
        //    gameState.BuildHexes(expected, "Blahblah");

        //    var actual = gameState.CreateHexesFile();
        //    Assert.AreEqual(expected, actual);
        //    //Assert.Inconclusive("Verify the correctness of this test method.");
        //}
    }
}
